﻿using Newtonsoft.Json;
using Pay.Core;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO
{
    /// <summary>
    /// 拓垦商城专题
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class token_shop_subject_dto {

        /// <summary>
        /// 专题Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 专题标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 专题图片URL地址
        /// </summary>
        public string img_url { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public ETokenShopSubjectStatus status { get; set; }
        
        /// <summary>
        /// 状态枚举描述 
        /// </summary>
        public string status_title { get { return this.status.ToDescription(); } }

        /// <summary>
        /// 类型
        /// </summary>
        public ETokenShopSubjectType type { get; set; }

        /// <summary>
        /// 类型枚举描述
        /// </summary>
        public string type_title { get { return this.type.ToDescription(); } }

        /// <summary>
        /// 专题链接地址
        /// </summary>
        public string topic_link { get; set; }

        /// <summary>
        /// 浏览量
        /// </summary>
        public int pageviews_num { get; set; }

        /// <summary>
        /// 商品数量
        /// </summary>
        public int product_num { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }

    }

    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class token_shop_subject_dto_ex : token_shop_subject_dto {

        /// <summary>
        /// 状态枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_status_list
        {
            get { return typeof(ETokenShopSubjectStatus).GetDropdownItemList(); }
        }
        /// <summary>
        /// 状态枚举值
        /// </summary>
        public string status_value { get; set; }
        /// <summary>
        /// 类型枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_type_list {
            get { return typeof(ETokenShopSubjectType).GetDropdownItemList(); }
        }
        /// <summary>
        /// 状态枚举值
        /// </summary>
        public string type_value { get; set; }

    }
}
